<template>
    <a-table :columns="columns" :data-source="dataSource">
        <template #bodyCell="{ column, record, index }">
            <template v-if="column.key === 'index'">
                {{ index + 1 }}
            </template> </template>
    </a-table>
</template>
  
<script setup>
const columns = [
    {
        title: '序号',
        dataIndex: 'index',
        key: 'index',
    },
    {
        title: "发票号码",
        dataIndex: "invoiceNumber",
        key: "invoiceNumber"
    },
    {
        title: '发票种类',
        dataIndex: 'invoiceType',
        key: 'invoiceType'
    },
    {
        title: "税点",
        dataIndex: "taxPoint",
        key: "taxPoint"
    }, {
        title: '发票金额',
        dataIndex: 'invoiceAmount',
        key: 'invoiceAmount'
    },
    {
        title: '收票日期',
        dataIndex: 'receiptDate',
        key: ' receiptDate '
    }, {
        title: '采购负责人 ',
        dataIndex: 'purchaseManager',
        key: ' purchaseManager '
    }
]
const dataSource = [
    {
        "id": 1,
        "invoiceNumber": "1234567890",
        "invoiceType": "增值税普通发票",
        "taxPoint": "3%",
        "invoiceAmount": 10000,
        "receiptDate": "2022-01-01",
        "purchaseManager": '张三'
    }, {
        "id": 2,
        "invoiceNumber": "0987654321",
        "invoiceType": "增值税专用发票",
        'taxPoint': '5%',
        'invoiceAmount': 20000,
        'receiptDate': '2022-02-05',
        'purchaseManager': "李四"
    }, {
        "id": 3,
        "invoiceNumber": "2468135790",
        "invoiceType": '增值税普通发票',
        taxPoint: '4%',
        invoiceAmount: 3000,
        receiptDate: "2022-03-10",
        purchaseManager: "王五"
    }
]

</script>
  
<style scoped>
/* 可以自定义样式 */
</style>